﻿<%@ Page EnableEventValidation="false"  Language="C#" AutoEventWireup="true" CodeBehind="ChiTietSanPham.aspx.cs" Inherits="TemplateH4.ChiTietSanPham" MasterPageFile="~/Site1.Master" %>


<%@ Register src="UserControl/MenuLoaiSP.ascx" tagname="MenuLoaiSP" tagprefix="uc3" %>
<%@ Register src="UserControl/TimKiemSanPham.ascx" tagname="TimKiemSanPham" tagprefix="uc4" %>



<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <title></title>
    <style type="text/css">

        a:link{    margin-left: 0px;
}

        .style2
        {
            width: 232px;
        }

    </style>
    
    <script language="javascript" type="text/javascript" >
        function CommentSuccess()
        {
        return window.alert("Đã lưu nhận xét! Chờ kiểm duyệt!");
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   
    <div>
    
        <div id="left-column">
        <div id="nav">

            <ul>
            <uc3:MenuLoaiSP ID="MenuLoaiSP1" runat="server" />
            </ul>
            
            <div style="margin-top:50px" >
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
         
                <uc4:TimKiemSanPham ID="TimKiemSanPham1" runat="server" />
           
             </div>
            
        </div>
        
         </div>
         
         
    <div id="right-column">
      
    <!-- box begin -->
		<div class="box">
					<div class="left-top-corner png"><div class="right-top-corner png"><div class="border-top png"></div></div></div>
					<div class="border-left png">
						<div class="border-right png">
							<div class="inside png">
                            <h2>
                                Chi tiết sản phẩm
                            </h2>
                            
                            
  <div style="padding-left:50px">                          				
  <asp:GridView ID="grvChiTiet" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" PageSize="2" Width="500px" 
        BorderStyle="None" onselectedindexchanged="grvChiTiet_SelectedIndexChanged1" 
            onrowdatabound="grvChiTiet_RowDataBound" EnableViewState="true" 
            ShowHeader="False" >
                            <Columns>
                                <asp:TemplateField>
                                    <FooterTemplate>
                                        <asp:Panel ID="Panel1" runat="server">
                                        </asp:Panel>
                                    </FooterTemplate>
                                    <ItemTemplate>
                                        <table style="width:100%;">
                                            <tr>
                                                <td >
                                                 <div >
                                                     &nbsp;&nbsp;
                                                    <asp:HyperLink ID="HyperLink1" runat="server" Font-Size="X-Large" 
                                                        ForeColor="#000099" Text='<%# Eval("TenSanPham") %>'></asp:HyperLink>
                                                    <br />
                                                   
                                                 <asp:UpdatePanel ID="UpdateHinh" runat="server">
                                                 <ContentTemplate>
                                                    <div style="padding:10px 0px 0px 90px">
                                                     <asp:ImageButton ID="btnQuayMatSau" runat="server" Height="31px" 
                                                         onclick="btnQuayMatSau_Click" ToolTip="Quay M?t Sau" Width="34px" 
                                                         ImageUrl="~/images/ImageForGUI/Rotate.png" />
                                                   </div>
                                                    
                                                    <center>
                                                    <div style="height:315px; width:315px">
                                                    <asp:Image ID="imgSP" runat="server" Height="315px" Width="315px" 
                                                         ImageUrl='<%# Eval("HinhSanPham.FirstNode.Value") %>' />
                                                    </div>
                                                    </center>
                                                    </ContentTemplate>
                                                    </asp:UpdatePanel>
                                                    
                                                     <br />
                                                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <br />
                                                      <asp:UpdatePanel ID="UpdateNX" runat="server">
                                                             <ContentTemplate>
                                                     <table style="width:98%;">
                                                         <tr>
                                                             <td class="style2" >
                                                                 <div style="float:right; height: 11px; width: 145px;">
                                                                     <asp:Label ID="Label5" runat="server" Text="Giá:"></asp:Label>
                                                                     <asp:Label ID="lbGia" runat="server" Font-Bold="True" Font-Size="Medium" 
                                                                         ForeColor="Red" Text='<%# Eval("DonGia","{0:0,##0} VND") %>'></asp:Label>
                                                                </div>
                                                                <br />
                                                                 <div style="float:right; height: 15px; width: 169px;">
                                                                     <asp:Label ID="Label7" runat="server" Text="Ðiểm:"></asp:Label>
                                                                     <asp:Label ID="lbDiem" runat="server" Font-Bold="True"></asp:Label>
                                                                </div>
                                                             </td>
                                                             <td>
                                                             <div style="float:left">
                                                                 <asp:ImageButton ID="ImageButton1" runat="server" Height="46px" 
                                                                     ImageUrl="~/images/ImageForGUI/GioHang1.gif" Width="52px" 
                                                                     ToolTip="Đặt vào giỏ hàng" onclick="ImageButton1_Click" />
                                                             </div>        
                                                                 <div style=" width:150px; float:left">
                                                                     <asp:Label ID="Label9" runat="server" Text="SL:"></asp:Label>
                                                                     <asp:TextBox ID="txtSoLuong" runat="server" Height="18px" Width="87px"></asp:TextBox>
                                                                     <br />
                                                                     <asp:Label ID="Label10" runat="server" Text="Size: "></asp:Label>
                                                                     <asp:DropDownList ID="cmbSize" runat="server" Height="27px" Width="73px">
                                                                         <asp:ListItem>S</asp:ListItem>
                                                                         <asp:ListItem>M</asp:ListItem>
                                                                         <asp:ListItem>L</asp:ListItem>
                                                                         <asp:ListItem>XL</asp:ListItem>
                                                                         <asp:ListItem>XXL</asp:ListItem>
                                                                     </asp:DropDownList>
   
                                                                 </div>    
                                                                     
                                                             </td>
                                                         </tr>
                                                       
                                                     </table>
                                                    
                                                     <table style="width:100%; height: 51px; ">
                                                         <tr>
                                                             <td align="center"  >
                                                             <div style="padding-left:100px">
                                                                
                                                                 <div   style="float:left; font-size:small" >
                                                                 <center>
                                                                     <asp:RadioButton ID="RadioButton1" runat="server"  EnableViewState="true" GroupName="grBauChon" />
                                                                 </center>
                                                                     +1đ
                                                                 </div>
                                                                  
                                                                  <div   style="float:left; margin-left:10px; font-size:small" >
                                                                 <center>
                                                                     <asp:RadioButton ID="RadioButton2" runat="server" GroupName="grBauChon" 
                                                                         EnableViewState="true"/>
                                                                 </center>
                                                                     +2đ
                                                                 </div>
                                                                 
                                                                  
                                                                  <div   style="float:left; margin-left:10px; font-size:small" >
                                                                 <center>
                                                                     <asp:RadioButton ID="RadioButton3" runat="server" GroupName="grBauChon" EnableViewState="true"/>
                                                                 </center>
                                                                     +3đ
                                                                 </div>
                                                                  
                                                                  <div   style="float:left; margin-left:10px; font-size:small" >
                                                                 <center>
                                                                     <asp:RadioButton ID="RadioButton4" runat="server" GroupName="grBauChon" EnableViewState="true" />
                                                                 </center>
                                                                    +4đ
                                                                 </div>
                                                                  
                                                                  <div   style="float:left; margin-left:10px; font-size:small" >
                                                                 <center>
                                                                     <asp:RadioButton ID="RadioButton5" runat="server" GroupName="grBauChon"  EnableViewState="true" />
                                                                    
                                                                 </center>
                                                                     +5đ
                                                                 </div>
                                                                  <div   style="float:left; margin-left:10px; font-size:small" >
                                                                  <asp:ImageButton ID="btnBauChon" runat="server" Height="26px" 
                                                                         ImageUrl="~/images/ImageForGUI/BauChon.png" ToolTip="B?u ch?n" Width="87px" 
                                                                          onclick="ImageButton2_Click" />
                                                                  </div>
                                                                
                                                                </div>
                                                             </td>
                                                             </tr>
                                                     </table>
                                                   
                                                     </ContentTemplate>
                                                     </asp:UpdatePanel>
                                                     
                                             <div style="padding-left:10px">
                                                    <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Medium" 
                                                        ForeColor="#990000" Text="Nhà SX:"></asp:Label>
                                                    <asp:HyperLink ID="HyperLink2" runat="server" 
                                                        Text='<%# Eval("shop_nhasanxuat.TenNhaSanXuat") %>'></asp:HyperLink>
                                                    <br />
                                                    <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="Medium" 
                                                        ForeColor="#990000" Text="Tình Trạng:"></asp:Label>
                                                    <asp:Label ID="lbTinhTrang" runat="server" 
                                                        Text='<%# Convert.ToInt32(Eval("SoLuongCon"))>0 ? "something" : "KhongCon" %>'></asp:Label>
                                                    <br />
                                                    <asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="Medium" 
                                                        ForeColor="#990000" Text="KM:"></asp:Label>
                                                    <asp:Label ID="lbKM" runat="server"></asp:Label>
                                                    &nbsp;<br />
                                                    <asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Size="Medium" 
                                                        ForeColor="#990000" Text="Phái:"></asp:Label>
                                                    <asp:Label ID="lbPhai" runat="server" 
                                                        Text='<%# Convert.ToBoolean(Eval("Phai"))==true?"Nam":"Nu" %>'></asp:Label>
                                                    <br />
                                                    <asp:Label ID="Label6" runat="server" Font-Bold="True" Font-Size="Medium" 
                                                        ForeColor="#990000" Text="Mô Tả:"></asp:Label>
                                                    <asp:Label ID="lbMoTa" runat="server" Text='<%# Eval("MoTa") %>'></asp:Label>
                                                     <br />
                                                     <asp:Label ID="Label8" runat="server" Font-Bold="True" Font-Size="Medium" 
                                                         ForeColor="#990000" Text="Nhận xét:"></asp:Label>
                                                     <br />
                                                     
                                                     <div style="padding-right:55px">
                                                     <asp:TextBox ID="txtNhanXet" runat="server" Height="55px" TextMode="MultiLine" 
                                                         Width="435px"></asp:TextBox>
                                                     <br />
                                                     <div style="float:right; margin-top:5px">
                                                     <asp:ImageButton ID="btnNhanXet" runat="server" Height="28px"  EnableViewState="true"
                                                         ImageUrl='<%# "~/images/ImageForGUI/NhanXet.png" %>' Width="83px" 
                                                         onclick="btnNhanXet_Click" />
                                                      </div>
                                                      </div>
                                                     

                                               </div>
                                               </div>
                                                </td>
                                                
                                            </tr>
                                           
                                        </table>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <PagerTemplate>
                                <asp:Panel ID="Panel2" runat="server">
                                </asp:Panel>
                            </PagerTemplate>
                        </asp:GridView>
                    
                    </div>
					</div>
				</div>
				<div class="left-bot-corner png"><div class="right-bot-corner png"><div class="border-bot png"></div></div></div>
			</div>
<!-- box end -->

      
<!-- box begin -->
<div class="box" style="margin-top:20px">
			<div class="left-top-corner png"><div class="right-top-corner png"><div class="border-top png"></div></div></div>
			<div class="border-left png">
				<div class="border-right png">
					<div class="inside png">
             

  <div style="margin-left:70px">
  <asp:UpdatePanel ID="UpdateNhanXet" runat="server">
    <ContentTemplate>
        <asp:GridView ID="grvComment" runat="server" AutoGenerateColumns="False" 
            style="margin-right: 0px" Width="401px" AllowPaging="True" 
            GridLines="None" onpageindexchanged="grvComment_PageIndexChanged" 
            onpageindexchanging="grvComment_PageIndexChanging" 
            onrowdatabound="grvComment_RowDataBound" 
            onselectedindexchanged="grvComment_SelectedIndexChanged" 
            onselectedindexchanging="grvComment_SelectedIndexChanging" PageSize="5">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        Nhận Xét<br />
                        <br />
                    </HeaderTemplate>
                    <ItemTemplate>
                    <div style="border: solid 1px #BBF0FE; margin-bottom:20px">
                    <div style=" height:25px; padding:4px 0px 0px 4px">
                        <asp:Label ID="lbUser" runat="server" Font-Bold="True"></asp:Label>
                        <asp:Label ID="txtDate0" runat="server" ForeColor="White" Text="--"></asp:Label>
                        <asp:Label ID="lbDate" runat="server" Text="Label" ForeColor="White"></asp:Label>
                        </div>
                        <br />
                        <table>
                        <tr>
                        
                        <td><div style="width: 70px; height: 70px">
                        <asp:Image ID="Image1" runat="server" Height="70px" Width="70px" 
                                ImageUrl='<%# "~/images/ImageForGUI/Avatar.png" %>' />
                        </div>
                        </td>
                        <td>
                        <asp:TextBox ID="txtComment" runat="server" Enabled="False" 
                            Height="70px" style=" margin:0px 5px 0px 5px" TextMode="MultiLine" 
                            Width="378px" BackColor="#08A3D6" BorderColor="#BBF0FE" BorderStyle="Solid" 
                                BorderWidth="1px" ForeColor="White" Font-Italic="True"></asp:TextBox>
                            </td>
                         </tr>
                        </table>
                       </div>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <HeaderStyle Font-Bold="True" Font-Size="X-Large" HorizontalAlign="Left" />
        </asp:GridView>
        <br />
        </ContentTemplate>
        </asp:UpdatePanel>
    </div>
                            
   </div>
                            


                <br />
            		
						</div>

					</div>
				</div>
				<div class="left-bot-corner png"><div class="right-bot-corner png"><div class="border-bot png"></div></div></div>
			</div>
<!-- box end -->
    
    </div>
    </div>


</asp:Content>